﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var authtypeData = Jxstar.findComboData('authtype');
	var projectjdData = Jxstar.findComboData('projectjd');
	var yesnoData = Jxstar.findComboData('yesno');
	var planstatus2Data = Jxstar.findComboData('planstatus2');
	var plantype2Data = Jxstar.findComboData('plantype2');
	var baotypeData = Jxstar.findComboData('baotype');
	var planstatusData = Jxstar.findComboData('planstatus');

	var cols = [
	{col:{header:'记录状态', width:70, sortable:true, defaultval:'0', align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'money_comp__auditing',type:'string'}},
	{col:{header:'项目名称', width:203, sortable:true}, field:{name:'money_plan__plan_name',type:'string'}},
	{col:{header:'项目类别', width:110, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: moneytypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: moneytypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < moneytypeData.length; i++) {
				if (moneytypeData[i][0] == value)
					return moneytypeData[i][1];
			}
		}}, field:{name:'money_plan__money_type',type:'string'}},
	{col:{header:'计划批复文号', width:100, sortable:true}, field:{name:'money_plan__check_fileno',type:'string'}},
	{col:{header:'授权形式', width:80, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: authtypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: authtypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < authtypeData.length; i++) {
				if (authtypeData[i][0] == value)
					return authtypeData[i][1];
			}
		}}, field:{name:'money_plan__auth_type',type:'string'}},
	{col:{header:'合同金额(万元)', width:100, sortable:true, renderer:JxUtil.formatNumber(2)}, field:{name:'money_plan__money_contract',type:'float'}},
	{col:{header:'开工时间', width:85, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.DateField({
			format: 'Y-m-d',
			minValue: '1900-01-01'
		}),
		renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_comp__project_sdate',type:'date'}},
	{col:{header:'竣工时间', width:86, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.DateField({
			format: 'Y-m-d',
			minValue: '1900-01-01'
		}),
		renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_comp__project_edate',type:'date'}},
	{col:{header:'*当前形象进度', width:120, sortable:true, align:'center',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: projectjdData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: projectjdData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < projectjdData.length; i++) {
				if (projectjdData[i][0] == value)
					return projectjdData[i][1];
			}
		}}, field:{name:'money_comp__project_process',type:'string'}},
	{col:{header:'统计月份', width:91, sortable:true, editable:false,
		editor:new Ext.form.DateField({
			format: 'Y-m',
			minValue: '1900-01-01'
		}),
		renderer:function(value) {
			return value ? value.format('Y-m') : '';
		}}, field:{name:'money_comp__stat_month',type:'date'}},
	{col:{header:'截止上年底累计付款(万元)', width:165, sortable:true, align:'right',
		editable:false,
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__sun_money1',type:'float'}},
	{col:{header:'今年截止统计月份实际付款(万元)', width:209, sortable:true, align:'right',
		editable:false,
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__tran_money1',type:'float'}},
	{col:{header:'*今年剩余月份预计付款(万元)', width:188, sortable:true, align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__tran_money2',type:'float'}},
	{col:{header:'今年预计付款(万元)', width:152, sortable:true, align:'right',
		editable:false,
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__money_pay1',type:'float'}},
	{col:{header:'截止今年底累计付款额(万元)', width:193, sortable:true, align:'right',
		editable:false,
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__sun_money',type:'float'}},
	{col:{header:'今年批复付款额(万元)', width:150, sortable:true, align:'right',
		editable:false,
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__year_money',type:'float'}},
	{col:{header:'*下年计划付款(万元)', width:155, sortable:true, align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__year_money1',type:'float'}},
	{col:{header:'*预计总投资(万元)', width:135, sortable:true, align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_comp__plan_money',type:'float'}},
	{col:{header:'下年计划实施内容', width:176, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:200
		})}, field:{name:'money_comp__year_content2',type:'string'}},
	{col:{header:'*是否结转', width:66, sortable:true, defaultval:'0', editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.Checkbox(),
		renderer:function(value) {
			return value=='1' ? jx.base.yes : jx.base.no;
		}}, field:{name:'money_comp__has_tran',type:'string'}},
	{col:{header:'备注', width:147, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:200
		})}, field:{name:'money_comp__comp_memo',type:'string'}},
	{col:{header:'是否上报国家局', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: yesnoData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: yesnoData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < yesnoData.length; i++) {
				if (yesnoData[i][0] == value)
					return yesnoData[i][1];
			}
		}}, field:{name:'money_plan__up_comp',type:'string'}},
	{col:{header:'*国家局项目状态', width:126, sortable:true, align:'center',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: planstatus2Data
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: planstatus2Data[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < planstatus2Data.length; i++) {
				if (planstatus2Data[i][0] == value)
					return planstatus2Data[i][1];
			}
		}}, field:{name:'money_comp__plan_status2',type:'string'}},
	{col:{header:'申请部门', width:100, sortable:true, editable:false,
		editor:new Ext.form.TextField({
			maxLength:50
		})}, field:{name:'money_comp__dept_name',type:'string'}},
	{col:{header:'立项批复日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__project_checkdate',type:'date'}},
	{col:{header:'国家局项目类别', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: plantype2Data
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: plantype2Data[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < plantype2Data.length; i++) {
				if (plantype2Data[i][0] == value)
					return plantype2Data[i][1];
			}
		}}, field:{name:'money_plan__money_type2',type:'string'}},
	{col:{header:'主要内容与申请理由', width:200, sortable:true}, field:{name:'money_plan__plan_desc',type:'string'}},
	{col:{header:'计划编号', width:100, sortable:true}, field:{name:'money_plan__plan_code',type:'string'}},
	{col:{header:'计划包属性', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: baotypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: baotypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < baotypeData.length; i++) {
				if (baotypeData[i][0] == value)
					return baotypeData[i][1];
			}
		}}, field:{name:'money_plan__bao_type',type:'string'}},
	{col:{header:'计划类型', width:100, sortable:true}, field:{name:'money_plan__plan_type',type:'string'}},
	{col:{header:'填报人', width:100, sortable:true, editable:false,
		editor:new Ext.form.TextField({
			maxLength:20
		})}, field:{name:'money_comp__stat_user',type:'string'}},
	{col:{header:'填报日期', width:100, sortable:true, editable:false,
		editor:new Ext.form.DateField({
			format: 'Y-m-d',
			minValue: '1900-01-01'
		}),
		renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_comp__stat_date',type:'date'}},
	{col:{header:'父计划编号', width:100, sortable:true}, field:{name:'money_plan__plan_parentcode',type:'string'}},
	{col:{header:'计划状态', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: planstatusData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: planstatusData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < planstatusData.length; i++) {
				if (planstatusData[i][0] == value)
					return planstatusData[i][1];
			}
		}}, field:{name:'money_plan__plan_status',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'money_comp__comp_id',type:'string'}},
	{col:{header:'计划ID', width:100, sortable:true, hidden:true}, field:{name:'money_comp__plan_id',type:'string'}},
	{col:{header:'申请部门ID', width:100, sortable:true, hidden:true}, field:{name:'money_comp__dept_id',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '1',
		isshow: '0',
		funid: 'money_comp'
	};
	
	
		
	return new Jxstar.GridNode(config);
}